package com.jingli.pile.util;

import cn.hutool.core.util.RandomUtil;
import com.jingli.pile.configuration.PushProperties;
import com.jingli.pile.entity.PlatformInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;

import java.util.Locale;

@Component
public class PlatformGenerator {
    private Logger logger = LoggerFactory.getLogger(PlatformGenerator.class);
    @Autowired
    private PasswordEncoder passwordEncoder;
    @Autowired
    private PushProperties pushProperties;

    public PlatformInfo generate(){
        PlatformInfo platformInfo = new PlatformInfo();
        platformInfo.setPlatformId("MA8N2HC57");
        platformInfo.setPlatformName("安徽换充电服务站正式");
        platformInfo.setContactPerson("");
        platformInfo.setMobile("");
        platformInfo.setEnv("prod");
        platformInfo.setPlatformSecretOrigin("bba9fe833cdcda89");
        platformInfo.setPlatformSecret(passwordEncoder.encode("bba9fe833cdcda89"));
        platformInfo.setSignSecret("437054efb96fa0da");
        platformInfo.setDataSecret("42e3d7cd9431fd27");
        platformInfo.setDataSecretIv("94a4d28f86fde1a8");
        platformInfo.setApiUrl("https://test-ah-hlht-notify.wnaie.cn:8543/evcs/v1.0.0");
        platformInfo.setAccessIp("112.29.132.167");
        platformInfo.setJingliPlatformId("76082124X");
        platformInfo.setJingliPlatformSecret("5pk1vt1rh6dzrlgy");
        platformInfo.setJingliDataSecret("wb2atvl4fzwo3uk8");
        platformInfo.setJingliDataSecretIv("rt3k2hsspyb2yret");
        platformInfo.setJingliSigSecret("q2pg8tpguseyt7om");
        return platformInfo;
    }
}
